home *** CD-ROM | disk | FTP | other *** search
/ The Fatted Calf / The Fatted Calf.iso / Applications / Scheduling / Cassandra / Source / Global.h < prev    next >
Encoding:
Text File  |  1991-12-20  |  5.6 KB  |  193 lines

  1. //
  2. // Global.h   Part of Cassandra
  3. //
  4. // Copyright (c) 1989, 1990, 1991 by Jiro Nakamura
  5. // All rights reserved
  6. //
  7. // RCS Information
  8. // Revision Number->    $Revision: 2.9 $
  9. // Last Revised->        $Date: 91/12/20 15:36:28 $
  10. //
  11.  
  12.  
  13. #import <appkit/Panel.h>
  14. #import <time.h>
  15. #import <soundkit/Sound.h>
  16. #import "cass.h"
  17.  
  18. #define    CLOCK_ANALOG    0
  19. #define    CLOCK_DIGITAL    1
  20. #define    CLOCK_NONE    2
  21.  
  22. @interface Global:Panel
  23. {
  24.     Sound *soundfile;
  25.     float oldVolumeLeft, oldVolumeRight;    // Previous volume levels
  26.  
  27.     char directory[128];
  28.     char eventFile[128];
  29.     char eventLogFile[128];
  30.     char notepadFile[128];
  31.     char sourceLoginFile[128];    // Command to execute to source    
  32.     char sourceLogoutFile[128];    // Command to execute to source    
  33.     
  34.     /* links to previous and next records and itself */
  35.     EFileLink    present, previous, next;
  36.  
  37.     struct tm ts;        // time structure  see ctime(3) for details
  38.  
  39.     int     lowPriority,        // The lowest priority for an event to
  40.         highPriority,        // be visible. The highest to highlight
  41.         clockBitmapNumber,    // Bitmap number of the clock 
  42.         clockType;        // Clock type 0 = analog, 1 = digital, 
  43.                     // 2 = none
  44.     float    alarmVolume;        // Volume to play alarm at, 0.0-1.0
  45.                     // -1 = play at system volume
  46.  
  47.     BOOL     showSeconds,        // Show seconds on the display?
  48.         showDate,        // Show date on clock appIcon?
  49.         todayShowTime,        // Should today show the time?
  50.         guru,            // Is the user is a cassandra guru
  51.         hideOnLaunch,        // Hide us on launch?
  52.         compressEvents,        // Compress event file after quitting
  53.         overviewOnLaunch,    // Whether to open Overview on launch 
  54.         notepadOnLaunch    ,    // Whether to open Notepad on launch 
  55.         eventLogOnLaunch,    // Whether to open EventLog on launch 
  56.         todayOnLaunch,        // Whether to open Today on launch 
  57.         weekOnLaunch,        //    ditto
  58.         playAlarm,        // Should we play an alarm sound?
  59.         militaryTime,        // Whether we are operating on 
  60.                     // military or am/pm time
  61.         saveScreen,        // Save the screen?
  62.         sourceLoginOnLaunch,    // Source login-file on launch?
  63.         autoLaunched;        // auto-launched?
  64.     
  65.     char screenSaver[128];        // Path to the screenSaver program
  66.     char alarmSound[128];        // The alarm sound file 
  67.     char msg[MESSAGE_SIZE];        // message buffer     
  68.     char fontName[64];        // The default font to use in windows
  69.     double    fontSize;        // and its size
  70.  
  71.     NXRect    overviewFrame,        // The coordinates and size of the
  72.         eventLogFrame,        // Overview, EventLog,
  73.         notepadFrame,        // Notepad and
  74.         todayFrame,        // Today windows
  75.         weekFrame;        // week windows too
  76.  
  77.     id     cassandra;        // Set by IB. Cassandra main.
  78.     id    overview;        //   "   "  . The Overview window
  79.     id    eventLog;        //   "   "  . The EventLog window
  80.     id    notepad;        //   "   "  . The Notepad window
  81.     id    today;            //   "   "  . The Today window
  82.     id    week;            //   "   "    week window
  83.     
  84.     id    alarmSoundButton;
  85.     id    alarmSoundForm;
  86.     id    playButton;
  87.     id    setButton;
  88.     id    stopButton;
  89.         
  90.     id    guruButton;
  91.     id     showSecondsButton;
  92.     id    showDateButton;
  93.     id    todayShowTimeButton;
  94.     id    compressEventsButton;
  95.     
  96.     id    screenSaverButton;
  97.     id    screenSaverForm;
  98.     id    setScreenSaverButton;
  99.     id    testScreenSaverButton;
  100.     
  101.     id    hideOnLaunchButton;
  102.     id    overviewOnLaunchButton;
  103.     id    notepadOnLaunchButton;
  104.     id    eventLogOnLaunchButton;
  105.     id    sourceLoginOnLaunchButton;
  106.     id    todayOnLaunchButton;
  107.     id    weekOnLaunchButton;
  108.  
  109.     id    clockTypeButton;
  110.     id    clockFaceMatrix;
  111.     id    militaryTimeButton;
  112.     id    volumeSlider;
  113.     id    volumeTextField;
  114.     id    volumeButton;
  115. }
  116.  
  117. + initialize;        // Initialize ourself and the defaults database
  118.  
  119. - load:sender;        // Load in default values from the defaults database    
  120. - display:sender;    // Open the panel and display these values
  121. - save;            // For compatibility with TextWindow save method
  122. - save:sender;        // Save the values off display
  123. - close;        // Close the panel
  124.  
  125. - saveWindowPositions: sender;    // Call other windows for their position
  126.             // and save the position for future reference
  127. - saveThisWindowPosition: (char *) defaultName : (id) window;    // Save
  128.             // only the calling window.
  129.  
  130. - guru: sender;            // Guru button hit (not implemented)
  131. - windowChanged: sender;    // The window has changed.
  132. - clockTypeChanged: sender;
  133.  
  134. - sound: sender;            // Sound activated/deactivated
  135. - playSound:sender;            // Play the sound
  136. - stopSound:sender;            // Stop playing the sound
  137. - setSound:sender;            // Set the sound
  138. - checkSound:sender;            // Check to see if user has valid
  139.                     // sound path
  140.                     
  141. - screenSaverChanged: sender;        // screensaver activated/deact
  142. - testScreenSaver: sender;        // test screensaver
  143. - setScreenSaver: sender;        // set screensaver
  144. - checkScreenSaver: sender;        // see if valid screensaver
  145.  
  146.  
  147. - volumeButtonHit: sender;    // Volume enabled/disabled
  148. - trackVolumeSlider: sender;    // Track the volume slider
  149.  
  150. // ============================
  151. // For info on what these 
  152. // return, see above declarations
  153. // ============================
  154. - (int) lowPriority;
  155. - (int) highPriority;
  156. - (int) clockType;
  157. - (float) volume;
  158. - (const char *)  alarmSound;
  159. - (const char *) eventFile;
  160. - (const char *) eventLogFile;
  161. - (const char *) notepadFile;
  162. - (const char *) clockfaceBitmapName;
  163. - (const char *) fontName;
  164. - (const char *) screenSaver;
  165. - (const char *) sourceLoginFile;
  166. - (const char *) sourceLogoutFile;
  167. - (double) fontSize;
  168.  
  169. - (BOOL) compressEvents;
  170. - (BOOL) guru;
  171. - (BOOL) militaryTime;
  172. - (BOOL) playAlarm;
  173. - (BOOL) saveScreen;
  174. - (BOOL) showSeconds;
  175. - (BOOL) showDate;
  176.  
  177. - (BOOL) eventLogOnLaunch;
  178. - (BOOL) hideOnLaunch;
  179. - (BOOL) notepadOnLaunch;
  180. - (BOOL) overviewOnLaunch;
  181. - (BOOL) sourceLoginOnLaunch;
  182. - (BOOL) todayOnLaunch;
  183. - (BOOL) todayShowTime;
  184. - (BOOL) weekOnLaunch;
  185. - (BOOL) autoLaunched;
  186.  
  187. - (NXRect *) overviewFrame;    // Return the default frame (window)
  188. - (NXRect *) eventLogFrame;    // size for these windows
  189. - (NXRect *) notepadFrame;
  190. - (NXRect *) todayFrame;
  191. - (NXRect *) weekFrame;
  192. @end
  193.